﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Core.GenericDefinitions;
using Core.GenericDefinitions.BaseClasses;

namespace UI.Common
{
    public class ApplicationInformation
    {
        #region CurrentUser VM Property
        private static User _CurrentUser;
        public static User CurrentUser
        {
            get
            {
                // if (ViewModelBase.IsInDesignModeStatic)
                // {                
                // }
                return _CurrentUser;
            }
            set
            {
                if (_CurrentUser == value) return;
                _CurrentUser = value;                
            }
        }
        #endregion CurrentUser

        #region LoginInfo VM Property
        private static LoginInformation _LoginInfo;
        public static LoginInformation LoginInfo
        {
            get
            {
                if (ViewModelBase.IsInDesignModeStatic)
                {
                    return new LoginInformation { UserName = "DesignMode", Password = "Password" };
                }
                return _LoginInfo;
            }
            set
            {
                if (_LoginInfo == value) return;
                _LoginInfo = value;   
            }
        }
        #endregion LoginInfo

        public static void SetApplicationInformations() 
        {
            CurrentUser = new User { IsLoggedIn = false };
            LoginInfo = new LoginInformation { UserName = "", Password = "" };
        }
    }
}
